// 生成左表
function initLeftTable() {
	var html = '<table class="table table-bordered" id="outtable">';
	console.log(leftlist);
	html += '<tr><caption id="captions">参选教师</caption></tr>';

	html += '<tr>';
	html += '<th>' + "序号" + '</th>';
	html += '<th>' + "姓名" + '</th>';
	html += '<th>' + "性别" + '</th>';
	html += '<th>' + "学院" + '</th>';
	html += '</tr>'

	var mark = 0;
	for (var j in leftlist) {
		if (!(('序号') in leftlist[j]) || !(('姓名') in leftlist[j]) || !(('性别') in leftlist[j]) ||
			!(('学院') in leftlist[j])) {
			mark = 1;
			$('#outtable').remove();
			swal("数据有误,请保证数据准确");

		} else {
			html += '<tr>';
			html += '<td class="modality">' + leftlist[j]['序号'] + '</td>';
			html += '<td class="modality">' + leftlist[j]['姓名'] + '</td>';
			html += '<td class="modality">' + leftlist[j]['性别'] + '</td>';
			html += '<td class="modality">' + leftlist[j]['学院'] + '</td>';
			html += '</tr>'
		}
	}
	html += '</table>';
	if (mark != 1) {
		$('#treeLeftList').append(html);
	}
}
